Skip to content

feat: Add support for getting Copilot cloud agent configuration#4241

Merged
gmlewis merged 14 commits into
google:masterfrom
maishivamhoo123:feat/copilot-cloud-agent-configuration
May 27, 2026
Merged

feat: Add support for getting Copilot cloud agent configuration#4241
gmlewis merged 14 commits into
google:masterfrom
maishivamhoo123:feat/copilot-cloud-agent-configuration

Conversation

@maishivamhoo123
Copy link
Copy Markdown
Contributor

Description

Add support for getting Copilot cloud agent configuration via the GitHub REST API.

Changes

  • Added CopilotCloudAgentConfiguration struct to handle the API response
  • Added EnabledTools struct for tool configuration details
  • Implemented GetCopilotCloudAgentConfiguration method in CopilotService
  • Fixed McpConfiguration field to use *json.RawMessage for proper null handling

Related Issue

Closes #4239

Testing

All existing tests pass and new unit tests validate the functionality.

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Comment thread openapi_operations.yaml
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.48%. Comparing base (c207b27) to head (5efd691).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4241   +/-   ##
=======================================
  Coverage   97.48%   97.48%           
=======================================
  Files         190      191    +1     
  Lines       19178    19188   +10     
=======================================
+ Hits        18695    18705   +10     
  Misses        268      268           
  Partials      215      215           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maishivamhoo123 maishivamhoo123 force-pushed the feat/copilot-cloud-agent-configuration branch from 59ab5d7 to 4420993 Compare May 21, 2026 03:23
@gmlewis gmlewis changed the title feat: add support for getting Copilot cloud agent configuration feat: Add support for getting Copilot cloud agent configuration May 21, 2026
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label May 21, 2026
Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @maishivamhoo123!
A couple minor tweaks, please, then we should be ready for any other contributor to this repo to provide a second LGTM+Approval before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode

Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go
@maishivamhoo123 maishivamhoo123 requested a review from gmlewis May 21, 2026 15:20
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go
Comment thread github/copilot_cloud_agent.go Outdated
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go Outdated
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Comment thread github/copilot_cloud_agent.go
Comment thread github/copilot_cloud_agent.go
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Comment thread github/copilot_cloud_agent.go Outdated
Comment thread github/copilot_cloud_agent.go
Comment thread github/copilot_cloud_agent_test.go Outdated
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
@maishivamhoo123
Copy link
Copy Markdown
Contributor Author

@gmlewis, @alexandear, @Not-Dhananjay-Mishra I’ve made all the recommended changes and addressed the review comments.
Could you please take another look at this PR ?

Thank you!

Copy link
Copy Markdown
Contributor

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label May 26, 2026
Comment thread github/copilot_cloud_agent.go Outdated
@maishivamhoo123
Copy link
Copy Markdown
Contributor Author

maishivamhoo123 commented May 26, 2026

image image
type CopilotCloudAgentConfiguration struct {
	MCPConfiguration                      json.RawMessage                `json:"mcp_configuration"`
	EnabledTools                          *CopilotCloudAgentEnabledTools `json:"enabled_tools"`
	RequireActionsWorkflowApproval        bool                           `json:"require_actions_workflow_approval"`
	IsFirewallEnabled                     bool                           `json:"is_firewall_enabled"`
	IsFirewallRecommendedAllowlistEnabled bool                           `json:"is_firewall_recommended_allowlist_enabled"`
	CustomAllowlist                       []string                       `json:"custom_allowlist"`
}

@gmlewis I made all the changes but it is still failing?

@maishivamhoo123 maishivamhoo123 requested a review from gmlewis May 26, 2026 12:22
@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented May 26, 2026

@gmlewis I made all the changes but it is still failing?

Ah, yes, you may need to delete the old linters in the bin subdirectory and then try again.

@maishivamhoo123
Copy link
Copy Markdown
Contributor Author

@gmlewis i made all the recommended changes . can you please review this PR.

Comment thread tools/structfield/structfield Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maishivamhoo123 can you please remove this binary file which get pushed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Not-Dhananjay-Mishra for pointing this out. Sorry i didn't see this? i will remove this .

@maishivamhoo123
Copy link
Copy Markdown
Contributor Author

@Not-Dhananjay-Mishra i removed binary file can you please verify it? Thank you!

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @maishivamhoo123 and reviewers!
LGTM.
Merging.

@gmlewis gmlewis merged commit 4eb6c2c into google:master May 27, 2026
14 checks passed
@maishivamhoo123 maishivamhoo123 deleted the feat/copilot-cloud-agent-configuration branch May 27, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for getting Copilot cloud agent configuration

4 participants